package com.open.source.ams.model;

import com.open.source.ams.annotation.ExcelEntityErrorProperty;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;

/**
 * @Author tanglingyu
 * @Date: 2022/03/04/ 20:42
 * @Description
 */
public abstract class AbsImportExcelModel implements ImportExcelModel {


  @Getter
  @ExcelEntityErrorProperty
  private String errorMsg;

  @Getter
  @Setter
  private int lineNo;


  @Getter
  @Setter
  private String sheetName;


  @Override
  public void setErrorMsg(String errorMsg) {
    this.errorMsg = errorMsg;
  }

  @Override
  public boolean hasErrorMsg() {
    return StringUtils.isNotBlank(errorMsg);
  }
}
